unit Class_Card;


interface
uses
  Classes,SysUtils,Uni,UniEngine;

type
  TCARD=class(TUniEngine)
  private
    FUNITLINK: string;
    FCARDIDEX: Integer;
    FCARDBDID: Integer;
    FCARDKJND: Integer;
    FCARDKJQJ: Integer;
    FDEPTLINK: string;
    FCARDYWBZ: Integer;
    FSORTTYPE: string;
    FSORTNAME: string;
    FSORTLINK: string;
    FZCLBTYPE: string;
    FZCLBNAME: string;
    FZCLBLINK: string;
    FCARDNAME: string;
    FCARDZJNX: Integer;
    FCARDZJFF: string;
    FCARDZJZT: string;
    FCARDCODE: string;
    FCARDJLDW: string;
    FCARDGGXH: string;
    FCARDGRRQ: Integer;
    FCARDSYNX: Integer;
    FCARDSYZK: string;
    FCARDCFDD: string;
    FCREWMODE: Integer;
    FCREWIDEX: string;
    FCARDKEEP: string;
    FCARDBDFS: string;
    FCARDZCYZ: Extended;
    FCARDLJZJ: Extended;
    FCARDZCJZ: Extended;
    FCARDYJCZ: Extended;
    FCARDZCDJ: Extended;
    FCARDCCBH: string;
    FCARDGYS: string;
    FCARDSCCS: string;
    FCARDZCSL: Integer;
    FCARDSSPP: string;
    FCARDZCTM: string;
    FCARDLRRQ: TDateTime;
    FCARDLRR: string;
    FCARDBZXX: string;
    FCARDZCXZ: string;
    FCARDZJLY: string;
    FCARDYYNX: Integer;
    FCARDCQXS: string;
    FCARDSYQR: string;
    FCARDFZSJ: TDateTime;
    FCARDZSHM: string;
    FCARDZYMJ: Extended;
    FCARDHQMJ: Extended;
    FCARDCZMJ: Extended;
    FCARDCJMJ: Extended;
    FCARDXZMJ: Extended;
    FCARDQTMJ: Extended;
    FCARDZLWZ: string;
    FCARDGLBM: string;
    FCARDSYRQ: TDateTime;
    FCARDSYFX: string;
    FLANDQSXZ: string;
    FLANDTDMJ: Extended;
    FLANDZMMJ: Extended;
    FLANDRZXS: string;
    FLANDTDLY: string;
    FBULDJGRQ: TDateTime;
    FBULDSYRQ: TDateTime;
    FBULDJZJG: string;
    FBULDJZMJ: Extended;
    FBULDFYMJ: Extended;
    FBULDJFMJ: Extended;
    FBULDHYSMJ: Extended;
    FBULDCKMJ: Extended;
    FBULDSTMJ: Extended;
    FBULDPDFMJ: Extended;
    FBULDSYMJ: Extended;
    FBULDDXJZMJ: Extended;
    FBULDDXSYMJ: Extended;
    FTRAFCZR: string;
    FTRAFCPXH: string;
    FTRAFPQL: string;
    FTRAFFLYT: string;
    FTRAFBZQK: string;
    FCARDBXZZRQ: TDateTime;
    FTRAFCLCD: string;
    FTRAFCPHM: string;
    FTRAFYXSLC: Extended;
    FBOOKWWDJ: string;
    FBOOKGLDW: string;
    FXZDFFWLB: string;
    FXZDFYWDXS: string;
    FXZDFTDYT: string;
    FXZDFSYXZ: string;
    FXZDFCRZZRQ: TDateTime;
    FXZDFSYQMJ: string;
    FXZDFTDDJ: string;
    FCARDIDENTITY: Integer;
    FDATASTAT: Integer;
    FKJNDKJQJ: Integer;
    FIMAGIDEX: Integer;
    FCARDSZJS: Integer;
    FCARDZGZ: Extended;
    FCARDGMRQ: Integer;
  protected
    procedure SetParameters;override;
    function  GetStrInsert:string;override;
    function  GetStrUpdate:string;override;
    function  GetStrDelete:string;override;
  public
    function  GetStrsIndex:string;override;
  public
    function  GetNextIdex:Integer;overload;
    function  GetNextIdex(AUniConnection:TUniConnection):Integer;overload;
  public
    function  CheckExist(AUniConnection:TUniConnection):Boolean;override;
  public
    destructor  Destroy; override;
    constructor Create;  
  published
    property UNITLINK: string read FUNITLINK write FUNITLINK;
    property CARDIDEX: Integer read FCARDIDEX write FCARDIDEX;
    property CARDBDID: Integer read FCARDBDID write FCARDBDID;
    property CARDKJND: Integer read FCARDKJND write FCARDKJND;
    property CARDKJQJ: Integer read FCARDKJQJ write FCARDKJQJ;
    property DEPTLINK: string read FDEPTLINK write FDEPTLINK;
    property CARDYWBZ: Integer read FCARDYWBZ write FCARDYWBZ;
    property SORTTYPE: string read FSORTTYPE write FSORTTYPE;
    property SORTNAME: string read FSORTNAME write FSORTNAME;
    property SORTLINK: string read FSORTLINK write FSORTLINK;
    property ZCLBTYPE: string read FZCLBTYPE write FZCLBTYPE;
    property ZCLBNAME: string read FZCLBNAME write FZCLBNAME;
    property ZCLBLINK: string read FZCLBLINK write FZCLBLINK;
    property CARDNAME: string read FCARDNAME write FCARDNAME;
    property CARDZJNX: Integer read FCARDZJNX write FCARDZJNX;
    property CARDZJFF: string read FCARDZJFF write FCARDZJFF;
    property CARDZJZT: string read FCARDZJZT write FCARDZJZT;
    property CARDCODE: string read FCARDCODE write FCARDCODE;
    property CARDJLDW: string read FCARDJLDW write FCARDJLDW;
    property CARDGGXH: string read FCARDGGXH write FCARDGGXH;
    property CARDGRRQ: Integer read FCARDGRRQ write FCARDGRRQ;
    property CARDSYNX: Integer read FCARDSYNX write FCARDSYNX;
    property CARDSYZK: string read FCARDSYZK write FCARDSYZK;
    property CARDCFDD: string read FCARDCFDD write FCARDCFDD;
    property CREWMODE: Integer read FCREWMODE write FCREWMODE;
    property CREWIDEX: string read FCREWIDEX write FCREWIDEX;
    property CARDKEEP: string read FCARDKEEP write FCARDKEEP;
    property CARDBDFS: string read FCARDBDFS write FCARDBDFS;
    property CARDZCYZ: Extended read FCARDZCYZ write FCARDZCYZ;
    property CARDLJZJ: Extended read FCARDLJZJ write FCARDLJZJ;
    property CARDZCJZ: Extended read FCARDZCJZ write FCARDZCJZ;
    property CARDYJCZ: Extended read FCARDYJCZ write FCARDYJCZ;
    property CARDZCDJ: Extended read FCARDZCDJ write FCARDZCDJ;
    property CARDCCBH: string read FCARDCCBH write FCARDCCBH;
    property CARDGYS: string read FCARDGYS write FCARDGYS;
    property CARDSCCS: string read FCARDSCCS write FCARDSCCS;
    property CARDZCSL: Integer read FCARDZCSL write FCARDZCSL;
    property CARDSSPP: string read FCARDSSPP write FCARDSSPP;
    property CARDZCTM: string read FCARDZCTM write FCARDZCTM;
    property CARDLRRQ: TDateTime read FCARDLRRQ write FCARDLRRQ;
    property CARDLRR: string read FCARDLRR write FCARDLRR;
    property CARDBZXX: string read FCARDBZXX write FCARDBZXX;
    property CARDZCXZ: string read FCARDZCXZ write FCARDZCXZ;
    property CARDZJLY: string read FCARDZJLY write FCARDZJLY;
    property CARDYYNX: Integer read FCARDYYNX write FCARDYYNX;
    property CARDCQXS: string read FCARDCQXS write FCARDCQXS;
    property CARDSYQR: string read FCARDSYQR write FCARDSYQR;
    property CARDFZSJ: TDateTime read FCARDFZSJ write FCARDFZSJ;
    property CARDZSHM: string read FCARDZSHM write FCARDZSHM;
    property CARDZYMJ: Extended read FCARDZYMJ write FCARDZYMJ;
    property CARDHQMJ: Extended read FCARDHQMJ write FCARDHQMJ;
    property CARDCZMJ: Extended read FCARDCZMJ write FCARDCZMJ;
    property CARDCJMJ: Extended read FCARDCJMJ write FCARDCJMJ;
    property CARDXZMJ: Extended read FCARDXZMJ write FCARDXZMJ;
    property CARDQTMJ: Extended read FCARDQTMJ write FCARDQTMJ;
    property CARDZLWZ: string read FCARDZLWZ write FCARDZLWZ;
    property CARDGLBM: string read FCARDGLBM write FCARDGLBM;
    property CARDSYRQ: TDateTime read FCARDSYRQ write FCARDSYRQ;
    property CARDSYFX: string read FCARDSYFX write FCARDSYFX;
    property LANDQSXZ: string read FLANDQSXZ write FLANDQSXZ;
    property LANDTDMJ: Extended read FLANDTDMJ write FLANDTDMJ;
    property LANDZMMJ: Extended read FLANDZMMJ write FLANDZMMJ;
    property LANDRZXS: string read FLANDRZXS write FLANDRZXS;
    property LANDTDLY: string read FLANDTDLY write FLANDTDLY;
    property BULDJGRQ: TDateTime read FBULDJGRQ write FBULDJGRQ;
    property BULDSYRQ: TDateTime read FBULDSYRQ write FBULDSYRQ;
    property BULDJZJG: string read FBULDJZJG write FBULDJZJG;
    property BULDJZMJ: Extended read FBULDJZMJ write FBULDJZMJ;
    property BULDFYMJ: Extended read FBULDFYMJ write FBULDFYMJ;
    property BULDJFMJ: Extended read FBULDJFMJ write FBULDJFMJ;
    property BULDHYSMJ: Extended read FBULDHYSMJ write FBULDHYSMJ;
    property BULDCKMJ: Extended read FBULDCKMJ write FBULDCKMJ;
    property BULDSTMJ: Extended read FBULDSTMJ write FBULDSTMJ;
    property BULDPDFMJ: Extended read FBULDPDFMJ write FBULDPDFMJ;
    property BULDSYMJ: Extended read FBULDSYMJ write FBULDSYMJ;
    property BULDDXJZMJ: Extended read FBULDDXJZMJ write FBULDDXJZMJ;
    property BULDDXSYMJ: Extended read FBULDDXSYMJ write FBULDDXSYMJ;
    property TRAFCZR: string read FTRAFCZR write FTRAFCZR;
    property TRAFCPXH: string read FTRAFCPXH write FTRAFCPXH;
    property TRAFPQL: string read FTRAFPQL write FTRAFPQL;
    property TRAFFLYT: string read FTRAFFLYT write FTRAFFLYT;
    property TRAFBZQK: string read FTRAFBZQK write FTRAFBZQK;
    property CARDBXZZRQ: TDateTime read FCARDBXZZRQ write FCARDBXZZRQ;
    property TRAFCLCD: string read FTRAFCLCD write FTRAFCLCD;
    property TRAFCPHM: string read FTRAFCPHM write FTRAFCPHM;
    property TRAFYXSLC: Extended read FTRAFYXSLC write FTRAFYXSLC;
    property BOOKWWDJ: string read FBOOKWWDJ write FBOOKWWDJ;
    property BOOKGLDW: string read FBOOKGLDW write FBOOKGLDW;
    property XZDFFWLB: string read FXZDFFWLB write FXZDFFWLB;
    property XZDFYWDXS: string read FXZDFYWDXS write FXZDFYWDXS;
    property XZDFTDYT: string read FXZDFTDYT write FXZDFTDYT;
    property XZDFSYXZ: string read FXZDFSYXZ write FXZDFSYXZ;
    property XZDFCRZZRQ: TDateTime read FXZDFCRZZRQ write FXZDFCRZZRQ;
    property XZDFSYQMJ: string read FXZDFSYQMJ write FXZDFSYQMJ;
    property XZDFTDDJ: string read FXZDFTDDJ write FXZDFTDDJ;
    property CARDIDENTITY: Integer read FCARDIDENTITY write FCARDIDENTITY;
    property DATASTAT: Integer read FDATASTAT write FDATASTAT;
    property KJNDKJQJ: Integer read FKJNDKJQJ write FKJNDKJQJ;
    property IMAGIDEX: Integer read FIMAGIDEX write FIMAGIDEX;
    property CARDSZJS: Integer read FCARDSZJS write FCARDSZJS;
    property CARDZGZ: Extended read FCARDZGZ write FCARDZGZ;
    property CARDGMRQ: Integer read FCARDGMRQ write FCARDGMRQ;    
  public
    class function  ReadDS(AUniQuery:TUniQuery):TUniEngine;override;
    class function  CopyIt(ACARD:TCARD):TCARD;overload;        
    class procedure CopyIt(ACARD:TCARD;var Result:TCARD);overload;       
  end;

implementation

{ TCARD }
procedure TCARD.SetParameters;
begin
  inherited;
  with FUniSQL.Params do
  begin
    case FOptTyp of
      otAddx:
      begin
        ParamByName('UNIT_LINK').Value := UNITLINK;
        ParamByName('CARD_IDEX').Value := CARDIDEX;
        ParamByName('CARD_BDID').Value := CARDBDID;
        ParamByName('CARD_KJND').Value := CARDKJND;
        ParamByName('CARD_KJQJ').Value := CARDKJQJ;
        ParamByName('DEPT_LINK').Value := DEPTLINK;
        ParamByName('CARD_YWBZ').Value := CARDYWBZ;
        ParamByName('SORT_TYPE').Value := SORTTYPE;
        ParamByName('SORT_NAME').Value := SORTNAME;
        ParamByName('SORT_LINK').Value := SORTLINK;
        ParamByName('ZCLB_TYPE').Value := ZCLBTYPE;
        ParamByName('ZCLB_NAME').Value := ZCLBNAME;
        ParamByName('ZCLB_LINK').Value := ZCLBLINK;
        ParamByName('CARD_NAME').Value := CARDNAME;
        ParamByName('CARD_ZJNX').Value := CARDZJNX;
        ParamByName('CARD_ZJFF').Value := CARDZJFF;
        ParamByName('CARD_ZJZT').Value := CARDZJZT;
        ParamByName('CARD_CODE').Value := CARDCODE;
        ParamByName('CARD_JLDW').Value := CARDJLDW;
        ParamByName('CARD_GGXH').Value := CARDGGXH;
        ParamByName('CARD_GRRQ').Value := CARDGRRQ;
        ParamByName('CARD_SYNX').Value := CARDSYNX;
        ParamByName('CARD_SYZK').Value := CARDSYZK;
        ParamByName('CARD_CFDD').Value := CARDCFDD;
        ParamByName('CREW_MODE').Value := CREWMODE;
        ParamByName('CREW_IDEX').Value := CREWIDEX;
        ParamByName('CARD_KEEP').Value := CARDKEEP;
        ParamByName('CARD_BDFS').Value := CARDBDFS;
        ParamByName('CARD_ZCYZ').Value := CARDZCYZ;
        ParamByName('CARD_LJZJ').Value := CARDLJZJ;
        ParamByName('CARD_ZCJZ').Value := CARDZCJZ;
        ParamByName('CARD_YJCZ').Value := CARDYJCZ;
        ParamByName('CARD_ZCDJ').Value := CARDZCDJ;
        ParamByName('CARD_CCBH').Value := CARDCCBH;
        ParamByName('CARD_GYS').Value := CARDGYS;
        ParamByName('CARD_SCCS').Value := CARDSCCS;
        ParamByName('CARD_ZCSL').Value := CARDZCSL;
        ParamByName('CARD_SSPP').Value := CARDSSPP;
        ParamByName('CARD_ZCTM').Value := CARDZCTM;
        ParamByName('CARD_LRRQ').Value := CARDLRRQ;
        ParamByName('CARD_LRR').Value := CARDLRR;
        ParamByName('CARD_BZXX').Value := CARDBZXX;
        ParamByName('CARD_ZCXZ').Value := CARDZCXZ;
        ParamByName('CARD_ZJLY').Value := CARDZJLY;
        ParamByName('CARD_YYNX').Value := CARDYYNX;
        ParamByName('CARD_CQXS').Value := CARDCQXS;
        ParamByName('CARD_SYQR').Value := CARDSYQR;
        ParamByName('CARD_FZSJ').Value := CARDFZSJ;
        ParamByName('CARD_ZSHM').Value := CARDZSHM;
        ParamByName('CARD_ZYMJ').Value := CARDZYMJ;
        ParamByName('CARD_HQMJ').Value := CARDHQMJ;
        ParamByName('CARD_CZMJ').Value := CARDCZMJ;
        ParamByName('CARD_CJMJ').Value := CARDCJMJ;
        ParamByName('CARD_XZMJ').Value := CARDXZMJ;
        ParamByName('CARD_QTMJ').Value := CARDQTMJ;
        ParamByName('CARD_ZLWZ').Value := CARDZLWZ;
        ParamByName('CARD_GLBM').Value := CARDGLBM;
        ParamByName('CARD_SYRQ').Value := CARDSYRQ;
        ParamByName('CARD_SYFX').Value := CARDSYFX;
        ParamByName('LAND_QSXZ').Value := LANDQSXZ;
        ParamByName('LAND_TDMJ').Value := LANDTDMJ;
        ParamByName('LAND_ZMMJ').Value := LANDZMMJ;
        ParamByName('LAND_RZXS').Value := LANDRZXS;
        ParamByName('LAND_TDLY').Value := LANDTDLY;
        ParamByName('BULD_JGRQ').Value := BULDJGRQ;
        ParamByName('BULD_SYRQ').Value := BULDSYRQ;
        ParamByName('BULD_JZJG').Value := BULDJZJG;
        ParamByName('BULD_JZMJ').Value := BULDJZMJ;
        ParamByName('BULD_FYMJ').Value := BULDFYMJ;
        ParamByName('BULD_JFMJ').Value := BULDJFMJ;
        ParamByName('BULD_HYSMJ').Value := BULDHYSMJ;
        ParamByName('BULD_CKMJ').Value := BULDCKMJ;
        ParamByName('BULD_STMJ').Value := BULDSTMJ;
        ParamByName('BULD_PDFMJ').Value := BULDPDFMJ;
        ParamByName('BULD_SYMJ').Value := BULDSYMJ;
        ParamByName('BULD_DXJZMJ').Value := BULDDXJZMJ;
        ParamByName('BULD_DXSYMJ').Value := BULDDXSYMJ;
        ParamByName('TRAF_CZR').Value := TRAFCZR;
        ParamByName('TRAF_CPXH').Value := TRAFCPXH;
        ParamByName('TRAF_PQL').Value := TRAFPQL;
        ParamByName('TRAF_FLYT').Value := TRAFFLYT;
        ParamByName('TRAF_BZQK').Value := TRAFBZQK;
        ParamByName('CARD_BXZZRQ').Value := CARDBXZZRQ;
        ParamByName('TRAF_CLCD').Value := TRAFCLCD;
        ParamByName('TRAF_CPHM').Value := TRAFCPHM;
        ParamByName('TRAF_YXSLC').Value := TRAFYXSLC;
        ParamByName('BOOK_WWDJ').Value := BOOKWWDJ;
        ParamByName('BOOK_GLDW').Value := BOOKGLDW;
        ParamByName('XZDF_FWLB').Value := XZDFFWLB;
        ParamByName('XZDF_YWDXS').Value := XZDFYWDXS;
        ParamByName('XZDF_TDYT').Value := XZDFTDYT;
        ParamByName('XZDF_SYXZ').Value := XZDFSYXZ;
        ParamByName('XZDF_CRZZRQ').Value := XZDFCRZZRQ;
        ParamByName('XZDF_SYQMJ').Value := XZDFSYQMJ;
        ParamByName('XZDF_TDDJ').Value := XZDFTDDJ;
        ParamByName('CARD_IDENTITY').Value := CARDIDENTITY;
        ParamByName('DATA_STAT').Value := DATASTAT;
        ParamByName('KJND_KJQJ').Value := KJNDKJQJ;
        ParamByName('IMAG_IDEX').Value := IMAGIDEX;
        ParamByName('CARD_SZJS').Value := CARDSZJS;
        ParamByName('CARD_ZGZ').Value := CARDZGZ;
        ParamByName('CARD_GMRQ').Value := CARDGMRQ; 
      end;
      otEdit:
      begin
        ParamByName('UNIT_LINK').Value := UNITLINK;
        ParamByName('CARD_IDEX').Value := CARDIDEX;
        ParamByName('CARD_BDID').Value := CARDBDID;
        ParamByName('CARD_KJND').Value := CARDKJND;
        ParamByName('CARD_KJQJ').Value := CARDKJQJ;
        ParamByName('DEPT_LINK').Value := DEPTLINK;
        ParamByName('CARD_YWBZ').Value := CARDYWBZ;
        ParamByName('SORT_TYPE').Value := SORTTYPE;
        ParamByName('SORT_NAME').Value := SORTNAME;
        ParamByName('SORT_LINK').Value := SORTLINK;
        ParamByName('ZCLB_TYPE').Value := ZCLBTYPE;
        ParamByName('ZCLB_NAME').Value := ZCLBNAME;
        ParamByName('ZCLB_LINK').Value := ZCLBLINK;
        ParamByName('CARD_NAME').Value := CARDNAME;
        ParamByName('CARD_ZJNX').Value := CARDZJNX;
        ParamByName('CARD_ZJFF').Value := CARDZJFF;
        ParamByName('CARD_ZJZT').Value := CARDZJZT;
        ParamByName('CARD_CODE').Value := CARDCODE;
        ParamByName('CARD_JLDW').Value := CARDJLDW;
        ParamByName('CARD_GGXH').Value := CARDGGXH;
        ParamByName('CARD_GRRQ').Value := CARDGRRQ;
        ParamByName('CARD_SYNX').Value := CARDSYNX;
        ParamByName('CARD_SYZK').Value := CARDSYZK;
        ParamByName('CARD_CFDD').Value := CARDCFDD;
        ParamByName('CREW_MODE').Value := CREWMODE;
        ParamByName('CREW_IDEX').Value := CREWIDEX;
        ParamByName('CARD_KEEP').Value := CARDKEEP;
        ParamByName('CARD_BDFS').Value := CARDBDFS;
        ParamByName('CARD_ZCYZ').Value := CARDZCYZ;
        ParamByName('CARD_LJZJ').Value := CARDLJZJ;
        ParamByName('CARD_ZCJZ').Value := CARDZCJZ;
        ParamByName('CARD_YJCZ').Value := CARDYJCZ;
        ParamByName('CARD_ZCDJ').Value := CARDZCDJ;
        ParamByName('CARD_CCBH').Value := CARDCCBH;
        ParamByName('CARD_GYS').Value := CARDGYS;
        ParamByName('CARD_SCCS').Value := CARDSCCS;
        ParamByName('CARD_ZCSL').Value := CARDZCSL;
        ParamByName('CARD_SSPP').Value := CARDSSPP;
        ParamByName('CARD_ZCTM').Value := CARDZCTM;
        ParamByName('CARD_LRRQ').Value := CARDLRRQ;
        ParamByName('CARD_LRR').Value := CARDLRR;
        ParamByName('CARD_BZXX').Value := CARDBZXX;
        ParamByName('CARD_ZCXZ').Value := CARDZCXZ;
        ParamByName('CARD_ZJLY').Value := CARDZJLY;
        ParamByName('CARD_YYNX').Value := CARDYYNX;
        ParamByName('CARD_CQXS').Value := CARDCQXS;
        ParamByName('CARD_SYQR').Value := CARDSYQR;
        ParamByName('CARD_FZSJ').Value := CARDFZSJ;
        ParamByName('CARD_ZSHM').Value := CARDZSHM;
        ParamByName('CARD_ZYMJ').Value := CARDZYMJ;
        ParamByName('CARD_HQMJ').Value := CARDHQMJ;
        ParamByName('CARD_CZMJ').Value := CARDCZMJ;
        ParamByName('CARD_CJMJ').Value := CARDCJMJ;
        ParamByName('CARD_XZMJ').Value := CARDXZMJ;
        ParamByName('CARD_QTMJ').Value := CARDQTMJ;
        ParamByName('CARD_ZLWZ').Value := CARDZLWZ;
        ParamByName('CARD_GLBM').Value := CARDGLBM;
        ParamByName('CARD_SYRQ').Value := CARDSYRQ;
        ParamByName('CARD_SYFX').Value := CARDSYFX;
        ParamByName('LAND_QSXZ').Value := LANDQSXZ;
        ParamByName('LAND_TDMJ').Value := LANDTDMJ;
        ParamByName('LAND_ZMMJ').Value := LANDZMMJ;
        ParamByName('LAND_RZXS').Value := LANDRZXS;
        ParamByName('LAND_TDLY').Value := LANDTDLY;
        ParamByName('BULD_JGRQ').Value := BULDJGRQ;
        ParamByName('BULD_SYRQ').Value := BULDSYRQ;
        ParamByName('BULD_JZJG').Value := BULDJZJG;
        ParamByName('BULD_JZMJ').Value := BULDJZMJ;
        ParamByName('BULD_FYMJ').Value := BULDFYMJ;
        ParamByName('BULD_JFMJ').Value := BULDJFMJ;
        ParamByName('BULD_HYSMJ').Value := BULDHYSMJ;
        ParamByName('BULD_CKMJ').Value := BULDCKMJ;
        ParamByName('BULD_STMJ').Value := BULDSTMJ;
        ParamByName('BULD_PDFMJ').Value := BULDPDFMJ;
        ParamByName('BULD_SYMJ').Value := BULDSYMJ;
        ParamByName('BULD_DXJZMJ').Value := BULDDXJZMJ;
        ParamByName('BULD_DXSYMJ').Value := BULDDXSYMJ;
        ParamByName('TRAF_CZR').Value := TRAFCZR;
        ParamByName('TRAF_CPXH').Value := TRAFCPXH;
        ParamByName('TRAF_PQL').Value := TRAFPQL;
        ParamByName('TRAF_FLYT').Value := TRAFFLYT;
        ParamByName('TRAF_BZQK').Value := TRAFBZQK;
        ParamByName('CARD_BXZZRQ').Value := CARDBXZZRQ;
        ParamByName('TRAF_CLCD').Value := TRAFCLCD;
        ParamByName('TRAF_CPHM').Value := TRAFCPHM;
        ParamByName('TRAF_YXSLC').Value := TRAFYXSLC;
        ParamByName('BOOK_WWDJ').Value := BOOKWWDJ;
        ParamByName('BOOK_GLDW').Value := BOOKGLDW;
        ParamByName('XZDF_FWLB').Value := XZDFFWLB;
        ParamByName('XZDF_YWDXS').Value := XZDFYWDXS;
        ParamByName('XZDF_TDYT').Value := XZDFTDYT;
        ParamByName('XZDF_SYXZ').Value := XZDFSYXZ;
        ParamByName('XZDF_CRZZRQ').Value := XZDFCRZZRQ;
        ParamByName('XZDF_SYQMJ').Value := XZDFSYQMJ;
        ParamByName('XZDF_TDDJ').Value := XZDFTDDJ;
        ParamByName('CARD_IDENTITY').Value := CARDIDENTITY;
        ParamByName('DATA_STAT').Value := DATASTAT;
        ParamByName('KJND_KJQJ').Value := KJNDKJQJ;
        ParamByName('IMAG_IDEX').Value := IMAGIDEX;
        ParamByName('CARD_SZJS').Value := CARDSZJS;
        ParamByName('CARD_ZGZ').Value := CARDZGZ;
        ParamByName('CARD_GMRQ').Value := CARDGMRQ; 
      end;  
      otDelt:
      begin
        ParamByName('UNIT_LINK').Value := UNITLINK;
        ParamByName('CARD_IDEX').Value := CARDIDEX;
        ParamByName('CARD_BDID').Value := CARDBDID;
 
      end;  
    end;
  end;
end;

function TCARD.CheckExist(AUniConnection: TUniConnection): Boolean;
begin
  Result:=CheckExist('TBL_CARD',['UNIT_LINK',UNITLINK,'CARD_IDEX',CARDIDEX,'CARD_BDID',CARDBDID],AUniConnection);
end;

function TCARD.GetNextIdex: Integer;
begin

end;

function TCARD.GetNextIdex(AUniConnection: TUniConnection): Integer;
begin

end;

function TCARD.GetStrDelete: string;
begin
  Result:='DELETE FROM TBL_CARD WHERE   UNIT_LINK=:UNIT_LINK AND CARD_IDEX=:CARD_IDEX AND CARD_BDID=:CARD_BDID';
end;

function TCARD.GetStrInsert: string;
begin
  Result:='INSERT INTO TBL_CARD'
         +'    ( UNIT_LINK, CARD_IDEX, CARD_BDID, CARD_KJND, CARD_KJQJ'
         +'    , DEPT_LINK, CARD_YWBZ, SORT_TYPE, SORT_NAME, SORT_LINK'
         +'    , ZCLB_TYPE, ZCLB_NAME, ZCLB_LINK, CARD_NAME, CARD_ZJNX'
         +'    , CARD_ZJFF, CARD_ZJZT, CARD_CODE, CARD_JLDW, CARD_GGXH'
         +'    , CARD_GRRQ, CARD_SYNX, CARD_SYZK, CARD_CFDD, CREW_MODE'
         +'    , CREW_IDEX, CARD_KEEP, CARD_BDFS, CARD_ZCYZ, CARD_LJZJ'
         +'    , CARD_ZCJZ, CARD_YJCZ, CARD_ZCDJ, CARD_CCBH, CARD_GYS'
         +'    , CARD_SCCS, CARD_ZCSL, CARD_SSPP, CARD_ZCTM, CARD_LRRQ'
         +'    , CARD_LRR, CARD_BZXX, CARD_ZCXZ, CARD_ZJLY, CARD_YYNX'
         +'    , CARD_CQXS, CARD_SYQR, CARD_FZSJ, CARD_ZSHM, CARD_ZYMJ'
         +'    , CARD_HQMJ, CARD_CZMJ, CARD_CJMJ, CARD_XZMJ, CARD_QTMJ'
         +'    , CARD_ZLWZ, CARD_GLBM, CARD_SYRQ, CARD_SYFX, LAND_QSXZ'
         +'    , LAND_TDMJ, LAND_ZMMJ, LAND_RZXS, LAND_TDLY, BULD_JGRQ'
         +'    , BULD_SYRQ, BULD_JZJG, BULD_JZMJ, BULD_FYMJ, BULD_JFMJ'
         +'    , BULD_HYSMJ, BULD_CKMJ, BULD_STMJ, BULD_PDFMJ, BULD_SYMJ'
         +'    , BULD_DXJZMJ, BULD_DXSYMJ, TRAF_CZR, TRAF_CPXH, TRAF_PQL'
         +'    , TRAF_FLYT, TRAF_BZQK, CARD_BXZZRQ, TRAF_CLCD, TRAF_CPHM'
         +'    , TRAF_YXSLC, BOOK_WWDJ, BOOK_GLDW, XZDF_FWLB, XZDF_YWDXS'
         +'    , XZDF_TDYT, XZDF_SYXZ, XZDF_CRZZRQ, XZDF_SYQMJ, XZDF_TDDJ'
         +'    , CARD_IDENTITY, DATA_STAT, KJND_KJQJ, IMAG_IDEX, CARD_SZJS'
         +'    , CARD_ZGZ, CARD_GMRQ)'
         +'    VALUES'
         +'    (:UNIT_LINK,:CARD_IDEX,:CARD_BDID,:CARD_KJND,:CARD_KJQJ'
         +'    ,:DEPT_LINK,:CARD_YWBZ,:SORT_TYPE,:SORT_NAME,:SORT_LINK'
         +'    ,:ZCLB_TYPE,:ZCLB_NAME,:ZCLB_LINK,:CARD_NAME,:CARD_ZJNX'
         +'    ,:CARD_ZJFF,:CARD_ZJZT,:CARD_CODE,:CARD_JLDW,:CARD_GGXH'
         +'    ,:CARD_GRRQ,:CARD_SYNX,:CARD_SYZK,:CARD_CFDD,:CREW_MODE'
         +'    ,:CREW_IDEX,:CARD_KEEP,:CARD_BDFS,:CARD_ZCYZ,:CARD_LJZJ'
         +'    ,:CARD_ZCJZ,:CARD_YJCZ,:CARD_ZCDJ,:CARD_CCBH,:CARD_GYS'
         +'    ,:CARD_SCCS,:CARD_ZCSL,:CARD_SSPP,:CARD_ZCTM,:CARD_LRRQ'
         +'    ,:CARD_LRR,:CARD_BZXX,:CARD_ZCXZ,:CARD_ZJLY,:CARD_YYNX'
         +'    ,:CARD_CQXS,:CARD_SYQR,:CARD_FZSJ,:CARD_ZSHM,:CARD_ZYMJ'
         +'    ,:CARD_HQMJ,:CARD_CZMJ,:CARD_CJMJ,:CARD_XZMJ,:CARD_QTMJ'
         +'    ,:CARD_ZLWZ,:CARD_GLBM,:CARD_SYRQ,:CARD_SYFX,:LAND_QSXZ'
         +'    ,:LAND_TDMJ,:LAND_ZMMJ,:LAND_RZXS,:LAND_TDLY,:BULD_JGRQ'
         +'    ,:BULD_SYRQ,:BULD_JZJG,:BULD_JZMJ,:BULD_FYMJ,:BULD_JFMJ'
         +'    ,:BULD_HYSMJ,:BULD_CKMJ,:BULD_STMJ,:BULD_PDFMJ,:BULD_SYMJ'
         +'    ,:BULD_DXJZMJ,:BULD_DXSYMJ,:TRAF_CZR,:TRAF_CPXH,:TRAF_PQL'
         +'    ,:TRAF_FLYT,:TRAF_BZQK,:CARD_BXZZRQ,:TRAF_CLCD,:TRAF_CPHM'
         +'    ,:TRAF_YXSLC,:BOOK_WWDJ,:BOOK_GLDW,:XZDF_FWLB,:XZDF_YWDXS'
         +'    ,:XZDF_TDYT,:XZDF_SYXZ,:XZDF_CRZZRQ,:XZDF_SYQMJ,:XZDF_TDDJ'
         +'    ,:CARD_IDENTITY,:DATA_STAT,:KJND_KJQJ,:IMAG_IDEX,:CARD_SZJS'
         +'    ,:CARD_ZGZ,:CARD_GMRQ)';
end;

function TCARD.GetStrsIndex: string;
begin
  Result:=Format('%S-%D-%D',[UNITLINK,CARDIDEX,CARDBDID]);
end;

function TCARD.GetStrUpdate: string;
begin
  Result:='UPDATE  TBL_CARD SET'
         +'    CARD_KJND=:CARD_KJND,'
         +'    CARD_KJQJ=:CARD_KJQJ,'
         +'    DEPT_LINK=:DEPT_LINK,'
         +'    CARD_YWBZ=:CARD_YWBZ,'
         +'    SORT_TYPE=:SORT_TYPE,'
         +'    SORT_NAME=:SORT_NAME,'
         +'    SORT_LINK=:SORT_LINK,'
         +'    ZCLB_TYPE=:ZCLB_TYPE,'
         +'    ZCLB_NAME=:ZCLB_NAME,'
         +'    ZCLB_LINK=:ZCLB_LINK,'
         +'    CARD_NAME=:CARD_NAME,'
         +'    CARD_ZJNX=:CARD_ZJNX,'
         +'    CARD_ZJFF=:CARD_ZJFF,'
         +'    CARD_ZJZT=:CARD_ZJZT,'
         +'    CARD_CODE=:CARD_CODE,'
         +'    CARD_JLDW=:CARD_JLDW,'
         +'    CARD_GGXH=:CARD_GGXH,'
         +'    CARD_GRRQ=:CARD_GRRQ,'
         +'    CARD_SYNX=:CARD_SYNX,'
         +'    CARD_SYZK=:CARD_SYZK,'
         +'    CARD_CFDD=:CARD_CFDD,'
         +'    CREW_MODE=:CREW_MODE,'
         +'    CREW_IDEX=:CREW_IDEX,'
         +'    CARD_KEEP=:CARD_KEEP,'
         +'    CARD_BDFS=:CARD_BDFS,'
         +'    CARD_ZCYZ=:CARD_ZCYZ,'
         +'    CARD_LJZJ=:CARD_LJZJ,'
         +'    CARD_ZCJZ=:CARD_ZCJZ,'
         +'    CARD_YJCZ=:CARD_YJCZ,'
         +'    CARD_ZCDJ=:CARD_ZCDJ,'
         +'    CARD_CCBH=:CARD_CCBH,'
         +'    CARD_GYS=:CARD_GYS,'
         +'    CARD_SCCS=:CARD_SCCS,'
         +'    CARD_ZCSL=:CARD_ZCSL,'
         +'    CARD_SSPP=:CARD_SSPP,'
         +'    CARD_ZCTM=:CARD_ZCTM,'
         +'    CARD_LRRQ=:CARD_LRRQ,'
         +'    CARD_LRR=:CARD_LRR,'
         +'    CARD_BZXX=:CARD_BZXX,'
         +'    CARD_ZCXZ=:CARD_ZCXZ,'
         +'    CARD_ZJLY=:CARD_ZJLY,'
         +'    CARD_YYNX=:CARD_YYNX,'
         +'    CARD_CQXS=:CARD_CQXS,'
         +'    CARD_SYQR=:CARD_SYQR,'
         +'    CARD_FZSJ=:CARD_FZSJ,'
         +'    CARD_ZSHM=:CARD_ZSHM,'
         +'    CARD_ZYMJ=:CARD_ZYMJ,'
         +'    CARD_HQMJ=:CARD_HQMJ,'
         +'    CARD_CZMJ=:CARD_CZMJ,'
         +'    CARD_CJMJ=:CARD_CJMJ,'
         +'    CARD_XZMJ=:CARD_XZMJ,'
         +'    CARD_QTMJ=:CARD_QTMJ,'
         +'    CARD_ZLWZ=:CARD_ZLWZ,'
         +'    CARD_GLBM=:CARD_GLBM,'
         +'    CARD_SYRQ=:CARD_SYRQ,'
         +'    CARD_SYFX=:CARD_SYFX,'
         +'    LAND_QSXZ=:LAND_QSXZ,'
         +'    LAND_TDMJ=:LAND_TDMJ,'
         +'    LAND_ZMMJ=:LAND_ZMMJ,'
         +'    LAND_RZXS=:LAND_RZXS,'
         +'    LAND_TDLY=:LAND_TDLY,'
         +'    BULD_JGRQ=:BULD_JGRQ,'
         +'    BULD_SYRQ=:BULD_SYRQ,'
         +'    BULD_JZJG=:BULD_JZJG,'
         +'    BULD_JZMJ=:BULD_JZMJ,'
         +'    BULD_FYMJ=:BULD_FYMJ,'
         +'    BULD_JFMJ=:BULD_JFMJ,'
         +'    BULD_HYSMJ=:BULD_HYSMJ,'
         +'    BULD_CKMJ=:BULD_CKMJ,'
         +'    BULD_STMJ=:BULD_STMJ,'
         +'    BULD_PDFMJ=:BULD_PDFMJ,'
         +'    BULD_SYMJ=:BULD_SYMJ,'
         +'    BULD_DXJZMJ=:BULD_DXJZMJ,'
         +'    BULD_DXSYMJ=:BULD_DXSYMJ,'
         +'    TRAF_CZR=:TRAF_CZR,'
         +'    TRAF_CPXH=:TRAF_CPXH,'
         +'    TRAF_PQL=:TRAF_PQL,'
         +'    TRAF_FLYT=:TRAF_FLYT,'
         +'    TRAF_BZQK=:TRAF_BZQK,'
         +'    CARD_BXZZRQ=:CARD_BXZZRQ,'
         +'    TRAF_CLCD=:TRAF_CLCD,'
         +'    TRAF_CPHM=:TRAF_CPHM,'
         +'    TRAF_YXSLC=:TRAF_YXSLC,'
         +'    BOOK_WWDJ=:BOOK_WWDJ,'
         +'    BOOK_GLDW=:BOOK_GLDW,'
         +'    XZDF_FWLB=:XZDF_FWLB,'
         +'    XZDF_YWDXS=:XZDF_YWDXS,'
         +'    XZDF_TDYT=:XZDF_TDYT,'
         +'    XZDF_SYXZ=:XZDF_SYXZ,'
         +'    XZDF_CRZZRQ=:XZDF_CRZZRQ,'
         +'    XZDF_SYQMJ=:XZDF_SYQMJ,'
         +'    XZDF_TDDJ=:XZDF_TDDJ,'
         +'    CARD_IDENTITY=:CARD_IDENTITY,'
         +'    DATA_STAT=:DATA_STAT,'
         +'    KJND_KJQJ=:KJND_KJQJ,'
         +'    IMAG_IDEX=:IMAG_IDEX,'
         +'    CARD_SZJS=:CARD_SZJS,'
         +'    CARD_ZGZ=:CARD_ZGZ,'
         +'    CARD_GMRQ=:CARD_GMRQ'
         +'    WHERE UNIT_LINK=:UNIT_LINK'
         +'    AND   CARD_IDEX=:CARD_IDEX'
         +'    AND   CARD_BDID=:CARD_BDID';
end;

constructor TCARD.Create;
begin

end;

destructor TCARD.Destroy;
begin

  inherited;
end;

class function TCARD.ReadDS(AUniQuery: TUniQuery): TUniEngine;
begin
  Result:=TCARD.Create;
  with TCARD(Result) do
  begin
    UNITLINK:=AUniQuery.FieldByName('UNIT_LINK').AsString;
    CARDIDEX:=AUniQuery.FieldByName('CARD_IDEX').AsInteger;
    CARDBDID:=AUniQuery.FieldByName('CARD_BDID').AsInteger;
    CARDKJND:=AUniQuery.FieldByName('CARD_KJND').AsInteger;
    CARDKJQJ:=AUniQuery.FieldByName('CARD_KJQJ').AsInteger;
    DEPTLINK:=AUniQuery.FieldByName('DEPT_LINK').AsString;
    CARDYWBZ:=AUniQuery.FieldByName('CARD_YWBZ').AsInteger;
    SORTTYPE:=AUniQuery.FieldByName('SORT_TYPE').AsString;
    SORTNAME:=AUniQuery.FieldByName('SORT_NAME').AsString;
    SORTLINK:=AUniQuery.FieldByName('SORT_LINK').AsString;
    ZCLBTYPE:=AUniQuery.FieldByName('ZCLB_TYPE').AsString;
    ZCLBNAME:=AUniQuery.FieldByName('ZCLB_NAME').AsString;
    ZCLBLINK:=AUniQuery.FieldByName('ZCLB_LINK').AsString;
    CARDNAME:=AUniQuery.FieldByName('CARD_NAME').AsString;
    CARDZJNX:=AUniQuery.FieldByName('CARD_ZJNX').AsInteger;
    CARDZJFF:=AUniQuery.FieldByName('CARD_ZJFF').AsString;
    CARDZJZT:=AUniQuery.FieldByName('CARD_ZJZT').AsString;
    CARDCODE:=AUniQuery.FieldByName('CARD_CODE').AsString;
    CARDJLDW:=AUniQuery.FieldByName('CARD_JLDW').AsString;
    CARDGGXH:=AUniQuery.FieldByName('CARD_GGXH').AsString;
    CARDGRRQ:=AUniQuery.FieldByName('CARD_GRRQ').AsInteger;
    CARDSYNX:=AUniQuery.FieldByName('CARD_SYNX').AsInteger;
    CARDSYZK:=AUniQuery.FieldByName('CARD_SYZK').AsString;
    CARDCFDD:=AUniQuery.FieldByName('CARD_CFDD').AsString;
    CREWMODE:=AUniQuery.FieldByName('CREW_MODE').AsInteger;
    CREWIDEX:=AUniQuery.FieldByName('CREW_IDEX').AsString;
    CARDKEEP:=AUniQuery.FieldByName('CARD_KEEP').AsString;
    CARDBDFS:=AUniQuery.FieldByName('CARD_BDFS').AsString;
    CARDZCYZ:=AUniQuery.FieldByName('CARD_ZCYZ').AsFloat;
    CARDLJZJ:=AUniQuery.FieldByName('CARD_LJZJ').AsFloat;
    CARDZCJZ:=AUniQuery.FieldByName('CARD_ZCJZ').AsFloat;
    CARDYJCZ:=AUniQuery.FieldByName('CARD_YJCZ').AsFloat;
    CARDZCDJ:=AUniQuery.FieldByName('CARD_ZCDJ').AsFloat;
    CARDCCBH:=AUniQuery.FieldByName('CARD_CCBH').AsString;
    CARDGYS:=AUniQuery.FieldByName('CARD_GYS').AsString;
    CARDSCCS:=AUniQuery.FieldByName('CARD_SCCS').AsString;
    CARDZCSL:=AUniQuery.FieldByName('CARD_ZCSL').AsInteger;
    CARDSSPP:=AUniQuery.FieldByName('CARD_SSPP').AsString;
    CARDZCTM:=AUniQuery.FieldByName('CARD_ZCTM').AsString;
    CARDLRRQ:=AUniQuery.FieldByName('CARD_LRRQ').AsDateTime;
    CARDLRR:=AUniQuery.FieldByName('CARD_LRR').AsString;
    CARDBZXX:=AUniQuery.FieldByName('CARD_BZXX').AsString;
    CARDZCXZ:=AUniQuery.FieldByName('CARD_ZCXZ').AsString;
    CARDZJLY:=AUniQuery.FieldByName('CARD_ZJLY').AsString;
    CARDYYNX:=AUniQuery.FieldByName('CARD_YYNX').AsInteger;
    CARDCQXS:=AUniQuery.FieldByName('CARD_CQXS').AsString;
    CARDSYQR:=AUniQuery.FieldByName('CARD_SYQR').AsString;
    CARDFZSJ:=AUniQuery.FieldByName('CARD_FZSJ').AsDateTime;
    CARDZSHM:=AUniQuery.FieldByName('CARD_ZSHM').AsString;
    CARDZYMJ:=AUniQuery.FieldByName('CARD_ZYMJ').AsFloat;
    CARDHQMJ:=AUniQuery.FieldByName('CARD_HQMJ').AsFloat;
    CARDCZMJ:=AUniQuery.FieldByName('CARD_CZMJ').AsFloat;
    CARDCJMJ:=AUniQuery.FieldByName('CARD_CJMJ').AsFloat;
    CARDXZMJ:=AUniQuery.FieldByName('CARD_XZMJ').AsFloat;
    CARDQTMJ:=AUniQuery.FieldByName('CARD_QTMJ').AsFloat;
    CARDZLWZ:=AUniQuery.FieldByName('CARD_ZLWZ').AsString;
    CARDGLBM:=AUniQuery.FieldByName('CARD_GLBM').AsString;
    CARDSYRQ:=AUniQuery.FieldByName('CARD_SYRQ').AsDateTime;
    CARDSYFX:=AUniQuery.FieldByName('CARD_SYFX').AsString;
    LANDQSXZ:=AUniQuery.FieldByName('LAND_QSXZ').AsString;
    LANDTDMJ:=AUniQuery.FieldByName('LAND_TDMJ').AsFloat;
    LANDZMMJ:=AUniQuery.FieldByName('LAND_ZMMJ').AsFloat;
    LANDRZXS:=AUniQuery.FieldByName('LAND_RZXS').AsString;
    LANDTDLY:=AUniQuery.FieldByName('LAND_TDLY').AsString;
    BULDJGRQ:=AUniQuery.FieldByName('BULD_JGRQ').AsDateTime;
    BULDSYRQ:=AUniQuery.FieldByName('BULD_SYRQ').AsDateTime;
    BULDJZJG:=AUniQuery.FieldByName('BULD_JZJG').AsString;
    BULDJZMJ:=AUniQuery.FieldByName('BULD_JZMJ').AsFloat;
    BULDFYMJ:=AUniQuery.FieldByName('BULD_FYMJ').AsFloat;
    BULDJFMJ:=AUniQuery.FieldByName('BULD_JFMJ').AsFloat;
    BULDHYSMJ:=AUniQuery.FieldByName('BULD_HYSMJ').AsFloat;
    BULDCKMJ:=AUniQuery.FieldByName('BULD_CKMJ').AsFloat;
    BULDSTMJ:=AUniQuery.FieldByName('BULD_STMJ').AsFloat;
    BULDPDFMJ:=AUniQuery.FieldByName('BULD_PDFMJ').AsFloat;
    BULDSYMJ:=AUniQuery.FieldByName('BULD_SYMJ').AsFloat;
    BULDDXJZMJ:=AUniQuery.FieldByName('BULD_DXJZMJ').AsFloat;
    BULDDXSYMJ:=AUniQuery.FieldByName('BULD_DXSYMJ').AsFloat;
    TRAFCZR:=AUniQuery.FieldByName('TRAF_CZR').AsString;
    TRAFCPXH:=AUniQuery.FieldByName('TRAF_CPXH').AsString;
    TRAFPQL:=AUniQuery.FieldByName('TRAF_PQL').AsString;
    TRAFFLYT:=AUniQuery.FieldByName('TRAF_FLYT').AsString;
    TRAFBZQK:=AUniQuery.FieldByName('TRAF_BZQK').AsString;
    CARDBXZZRQ:=AUniQuery.FieldByName('CARD_BXZZRQ').AsDateTime;
    TRAFCLCD:=AUniQuery.FieldByName('TRAF_CLCD').AsString;
    TRAFCPHM:=AUniQuery.FieldByName('TRAF_CPHM').AsString;
    TRAFYXSLC:=AUniQuery.FieldByName('TRAF_YXSLC').AsFloat;
    BOOKWWDJ:=AUniQuery.FieldByName('BOOK_WWDJ').AsString;
    BOOKGLDW:=AUniQuery.FieldByName('BOOK_GLDW').AsString;
    XZDFFWLB:=AUniQuery.FieldByName('XZDF_FWLB').AsString;
    XZDFYWDXS:=AUniQuery.FieldByName('XZDF_YWDXS').AsString;
    XZDFTDYT:=AUniQuery.FieldByName('XZDF_TDYT').AsString;
    XZDFSYXZ:=AUniQuery.FieldByName('XZDF_SYXZ').AsString;
    XZDFCRZZRQ:=AUniQuery.FieldByName('XZDF_CRZZRQ').AsDateTime;
    XZDFSYQMJ:=AUniQuery.FieldByName('XZDF_SYQMJ').AsString;
    XZDFTDDJ:=AUniQuery.FieldByName('XZDF_TDDJ').AsString;
    CARDIDENTITY:=AUniQuery.FieldByName('CARD_IDENTITY').AsInteger;
    DATASTAT:=AUniQuery.FieldByName('DATA_STAT').AsInteger;
    KJNDKJQJ:=AUniQuery.FieldByName('KJND_KJQJ').AsInteger;
    IMAGIDEX:=AUniQuery.FieldByName('IMAG_IDEX').AsInteger;
    CARDSZJS:=AUniQuery.FieldByName('CARD_SZJS').AsInteger;
    CARDZGZ:=AUniQuery.FieldByName('CARD_ZGZ').AsFloat;
    CARDGMRQ:=AUniQuery.FieldByName('CARD_GMRQ').AsInteger;
  end;  
end;

class function  TCARD.CopyIt(ACARD: TCARD): TCARD;
begin
  Result:=TCARD.Create;
  Result.UNITLINK:=ACARD.UNITLINK;
  Result.CARDIDEX:=ACARD.CARDIDEX;
  Result.CARDBDID:=ACARD.CARDBDID;
  Result.CARDKJND:=ACARD.CARDKJND;
  Result.CARDKJQJ:=ACARD.CARDKJQJ;
  Result.DEPTLINK:=ACARD.DEPTLINK;
  Result.CARDYWBZ:=ACARD.CARDYWBZ;
  Result.SORTTYPE:=ACARD.SORTTYPE;
  Result.SORTNAME:=ACARD.SORTNAME;
  Result.SORTLINK:=ACARD.SORTLINK;
  Result.ZCLBTYPE:=ACARD.ZCLBTYPE;
  Result.ZCLBNAME:=ACARD.ZCLBNAME;
  Result.ZCLBLINK:=ACARD.ZCLBLINK;
  Result.CARDNAME:=ACARD.CARDNAME;
  Result.CARDZJNX:=ACARD.CARDZJNX;
  Result.CARDZJFF:=ACARD.CARDZJFF;
  Result.CARDZJZT:=ACARD.CARDZJZT;
  Result.CARDCODE:=ACARD.CARDCODE;
  Result.CARDJLDW:=ACARD.CARDJLDW;
  Result.CARDGGXH:=ACARD.CARDGGXH;
  Result.CARDGRRQ:=ACARD.CARDGRRQ;
  Result.CARDSYNX:=ACARD.CARDSYNX;
  Result.CARDSYZK:=ACARD.CARDSYZK;
  Result.CARDCFDD:=ACARD.CARDCFDD;
  Result.CREWMODE:=ACARD.CREWMODE;
  Result.CREWIDEX:=ACARD.CREWIDEX;
  Result.CARDKEEP:=ACARD.CARDKEEP;
  Result.CARDBDFS:=ACARD.CARDBDFS;
  Result.CARDZCYZ:=ACARD.CARDZCYZ;
  Result.CARDLJZJ:=ACARD.CARDLJZJ;
  Result.CARDZCJZ:=ACARD.CARDZCJZ;
  Result.CARDYJCZ:=ACARD.CARDYJCZ;
  Result.CARDZCDJ:=ACARD.CARDZCDJ;
  Result.CARDCCBH:=ACARD.CARDCCBH;
  Result.CARDGYS:=ACARD.CARDGYS;
  Result.CARDSCCS:=ACARD.CARDSCCS;
  Result.CARDZCSL:=ACARD.CARDZCSL;
  Result.CARDSSPP:=ACARD.CARDSSPP;
  Result.CARDZCTM:=ACARD.CARDZCTM;
  Result.CARDLRRQ:=ACARD.CARDLRRQ;
  Result.CARDLRR:=ACARD.CARDLRR;
  Result.CARDBZXX:=ACARD.CARDBZXX;
  Result.CARDZCXZ:=ACARD.CARDZCXZ;
  Result.CARDZJLY:=ACARD.CARDZJLY;
  Result.CARDYYNX:=ACARD.CARDYYNX;
  Result.CARDCQXS:=ACARD.CARDCQXS;
  Result.CARDSYQR:=ACARD.CARDSYQR;
  Result.CARDFZSJ:=ACARD.CARDFZSJ;
  Result.CARDZSHM:=ACARD.CARDZSHM;
  Result.CARDZYMJ:=ACARD.CARDZYMJ;
  Result.CARDHQMJ:=ACARD.CARDHQMJ;
  Result.CARDCZMJ:=ACARD.CARDCZMJ;
  Result.CARDCJMJ:=ACARD.CARDCJMJ;
  Result.CARDXZMJ:=ACARD.CARDXZMJ;
  Result.CARDQTMJ:=ACARD.CARDQTMJ;
  Result.CARDZLWZ:=ACARD.CARDZLWZ;
  Result.CARDGLBM:=ACARD.CARDGLBM;
  Result.CARDSYRQ:=ACARD.CARDSYRQ;
  Result.CARDSYFX:=ACARD.CARDSYFX;
  Result.LANDQSXZ:=ACARD.LANDQSXZ;
  Result.LANDTDMJ:=ACARD.LANDTDMJ;
  Result.LANDZMMJ:=ACARD.LANDZMMJ;
  Result.LANDRZXS:=ACARD.LANDRZXS;
  Result.LANDTDLY:=ACARD.LANDTDLY;
  Result.BULDJGRQ:=ACARD.BULDJGRQ;
  Result.BULDSYRQ:=ACARD.BULDSYRQ;
  Result.BULDJZJG:=ACARD.BULDJZJG;
  Result.BULDJZMJ:=ACARD.BULDJZMJ;
  Result.BULDFYMJ:=ACARD.BULDFYMJ;
  Result.BULDJFMJ:=ACARD.BULDJFMJ;
  Result.BULDHYSMJ:=ACARD.BULDHYSMJ;
  Result.BULDCKMJ:=ACARD.BULDCKMJ;
  Result.BULDSTMJ:=ACARD.BULDSTMJ;
  Result.BULDPDFMJ:=ACARD.BULDPDFMJ;
  Result.BULDSYMJ:=ACARD.BULDSYMJ;
  Result.BULDDXJZMJ:=ACARD.BULDDXJZMJ;
  Result.BULDDXSYMJ:=ACARD.BULDDXSYMJ;
  Result.TRAFCZR:=ACARD.TRAFCZR;
  Result.TRAFCPXH:=ACARD.TRAFCPXH;
  Result.TRAFPQL:=ACARD.TRAFPQL;
  Result.TRAFFLYT:=ACARD.TRAFFLYT;
  Result.TRAFBZQK:=ACARD.TRAFBZQK;
  Result.CARDBXZZRQ:=ACARD.CARDBXZZRQ;
  Result.TRAFCLCD:=ACARD.TRAFCLCD;
  Result.TRAFCPHM:=ACARD.TRAFCPHM;
  Result.TRAFYXSLC:=ACARD.TRAFYXSLC;
  Result.BOOKWWDJ:=ACARD.BOOKWWDJ;
  Result.BOOKGLDW:=ACARD.BOOKGLDW;
  Result.XZDFFWLB:=ACARD.XZDFFWLB;
  Result.XZDFYWDXS:=ACARD.XZDFYWDXS;
  Result.XZDFTDYT:=ACARD.XZDFTDYT;
  Result.XZDFSYXZ:=ACARD.XZDFSYXZ;
  Result.XZDFCRZZRQ:=ACARD.XZDFCRZZRQ;
  Result.XZDFSYQMJ:=ACARD.XZDFSYQMJ;
  Result.XZDFTDDJ:=ACARD.XZDFTDDJ;
  Result.CARDIDENTITY:=ACARD.CARDIDENTITY;
  Result.DATASTAT:=ACARD.DATASTAT;
  Result.KJNDKJQJ:=ACARD.KJNDKJQJ;
  Result.IMAGIDEX:=ACARD.IMAGIDEX;
  Result.CARDSZJS:=ACARD.CARDSZJS;
  Result.CARDZGZ:=ACARD.CARDZGZ;
  Result.CARDGMRQ:=ACARD.CARDGMRQ;
end;

class procedure TCARD.CopyIt(ACARD:TCARD;var Result:TCARD);
begin
  if Result=nil then Exit;
  Result.UNITLINK:=ACARD.UNITLINK;
  Result.CARDIDEX:=ACARD.CARDIDEX;
  Result.CARDBDID:=ACARD.CARDBDID;
  Result.CARDKJND:=ACARD.CARDKJND;
  Result.CARDKJQJ:=ACARD.CARDKJQJ;
  Result.DEPTLINK:=ACARD.DEPTLINK;
  Result.CARDYWBZ:=ACARD.CARDYWBZ;
  Result.SORTTYPE:=ACARD.SORTTYPE;
  Result.SORTNAME:=ACARD.SORTNAME;
  Result.SORTLINK:=ACARD.SORTLINK;
  Result.ZCLBTYPE:=ACARD.ZCLBTYPE;
  Result.ZCLBNAME:=ACARD.ZCLBNAME;
  Result.ZCLBLINK:=ACARD.ZCLBLINK;
  Result.CARDNAME:=ACARD.CARDNAME;
  Result.CARDZJNX:=ACARD.CARDZJNX;
  Result.CARDZJFF:=ACARD.CARDZJFF;
  Result.CARDZJZT:=ACARD.CARDZJZT;
  Result.CARDCODE:=ACARD.CARDCODE;
  Result.CARDJLDW:=ACARD.CARDJLDW;
  Result.CARDGGXH:=ACARD.CARDGGXH;
  Result.CARDGRRQ:=ACARD.CARDGRRQ;
  Result.CARDSYNX:=ACARD.CARDSYNX;
  Result.CARDSYZK:=ACARD.CARDSYZK;
  Result.CARDCFDD:=ACARD.CARDCFDD;
  Result.CREWMODE:=ACARD.CREWMODE;
  Result.CREWIDEX:=ACARD.CREWIDEX;
  Result.CARDKEEP:=ACARD.CARDKEEP;
  Result.CARDBDFS:=ACARD.CARDBDFS;
  Result.CARDZCYZ:=ACARD.CARDZCYZ;
  Result.CARDLJZJ:=ACARD.CARDLJZJ;
  Result.CARDZCJZ:=ACARD.CARDZCJZ;
  Result.CARDYJCZ:=ACARD.CARDYJCZ;
  Result.CARDZCDJ:=ACARD.CARDZCDJ;
  Result.CARDCCBH:=ACARD.CARDCCBH;
  Result.CARDGYS:=ACARD.CARDGYS;
  Result.CARDSCCS:=ACARD.CARDSCCS;
  Result.CARDZCSL:=ACARD.CARDZCSL;
  Result.CARDSSPP:=ACARD.CARDSSPP;
  Result.CARDZCTM:=ACARD.CARDZCTM;
  Result.CARDLRRQ:=ACARD.CARDLRRQ;
  Result.CARDLRR:=ACARD.CARDLRR;
  Result.CARDBZXX:=ACARD.CARDBZXX;
  Result.CARDZCXZ:=ACARD.CARDZCXZ;
  Result.CARDZJLY:=ACARD.CARDZJLY;
  Result.CARDYYNX:=ACARD.CARDYYNX;
  Result.CARDCQXS:=ACARD.CARDCQXS;
  Result.CARDSYQR:=ACARD.CARDSYQR;
  Result.CARDFZSJ:=ACARD.CARDFZSJ;
  Result.CARDZSHM:=ACARD.CARDZSHM;
  Result.CARDZYMJ:=ACARD.CARDZYMJ;
  Result.CARDHQMJ:=ACARD.CARDHQMJ;
  Result.CARDCZMJ:=ACARD.CARDCZMJ;
  Result.CARDCJMJ:=ACARD.CARDCJMJ;
  Result.CARDXZMJ:=ACARD.CARDXZMJ;
  Result.CARDQTMJ:=ACARD.CARDQTMJ;
  Result.CARDZLWZ:=ACARD.CARDZLWZ;
  Result.CARDGLBM:=ACARD.CARDGLBM;
  Result.CARDSYRQ:=ACARD.CARDSYRQ;
  Result.CARDSYFX:=ACARD.CARDSYFX;
  Result.LANDQSXZ:=ACARD.LANDQSXZ;
  Result.LANDTDMJ:=ACARD.LANDTDMJ;
  Result.LANDZMMJ:=ACARD.LANDZMMJ;
  Result.LANDRZXS:=ACARD.LANDRZXS;
  Result.LANDTDLY:=ACARD.LANDTDLY;
  Result.BULDJGRQ:=ACARD.BULDJGRQ;
  Result.BULDSYRQ:=ACARD.BULDSYRQ;
  Result.BULDJZJG:=ACARD.BULDJZJG;
  Result.BULDJZMJ:=ACARD.BULDJZMJ;
  Result.BULDFYMJ:=ACARD.BULDFYMJ;
  Result.BULDJFMJ:=ACARD.BULDJFMJ;
  Result.BULDHYSMJ:=ACARD.BULDHYSMJ;
  Result.BULDCKMJ:=ACARD.BULDCKMJ;
  Result.BULDSTMJ:=ACARD.BULDSTMJ;
  Result.BULDPDFMJ:=ACARD.BULDPDFMJ;
  Result.BULDSYMJ:=ACARD.BULDSYMJ;
  Result.BULDDXJZMJ:=ACARD.BULDDXJZMJ;
  Result.BULDDXSYMJ:=ACARD.BULDDXSYMJ;
  Result.TRAFCZR:=ACARD.TRAFCZR;
  Result.TRAFCPXH:=ACARD.TRAFCPXH;
  Result.TRAFPQL:=ACARD.TRAFPQL;
  Result.TRAFFLYT:=ACARD.TRAFFLYT;
  Result.TRAFBZQK:=ACARD.TRAFBZQK;
  Result.CARDBXZZRQ:=ACARD.CARDBXZZRQ;
  Result.TRAFCLCD:=ACARD.TRAFCLCD;
  Result.TRAFCPHM:=ACARD.TRAFCPHM;
  Result.TRAFYXSLC:=ACARD.TRAFYXSLC;
  Result.BOOKWWDJ:=ACARD.BOOKWWDJ;
  Result.BOOKGLDW:=ACARD.BOOKGLDW;
  Result.XZDFFWLB:=ACARD.XZDFFWLB;
  Result.XZDFYWDXS:=ACARD.XZDFYWDXS;
  Result.XZDFTDYT:=ACARD.XZDFTDYT;
  Result.XZDFSYXZ:=ACARD.XZDFSYXZ;
  Result.XZDFCRZZRQ:=ACARD.XZDFCRZZRQ;
  Result.XZDFSYQMJ:=ACARD.XZDFSYQMJ;
  Result.XZDFTDDJ:=ACARD.XZDFTDDJ;
  Result.CARDIDENTITY:=ACARD.CARDIDENTITY;
  Result.DATASTAT:=ACARD.DATASTAT;
  Result.KJNDKJQJ:=ACARD.KJNDKJQJ;
  Result.IMAGIDEX:=ACARD.IMAGIDEX;
  Result.CARDSZJS:=ACARD.CARDSZJS;
  Result.CARDZGZ:=ACARD.CARDZGZ;
  Result.CARDGMRQ:=ACARD.CARDGMRQ;
end;

end.

